﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>IupSbox</title>

<link rel="stylesheet" type="text/css" href="../../style.css">
</head>
<body>
<div id="navigation">
  <ul>
    <li><a href="#Creation">Creation</a></li>
    <li><a href="#Attributes">Attributes</a></li>
    <li><a href="#Callbacks">Callbacks</a></li>
    <li><a href="#Notes">Notes</a></li>
    <li><a href="#Examples">Examples</a></li>
    <li><a href="#SeeAlso">See Also</a></li>
  </ul>
</div>

<h2>IupSbox</h2>
<p>Creates a void container that allows its child to be resized. Allows 
expanding and contracting the child <strong>size</strong> in one 
direction.</p>

  <p>
  It does not have a native representation but it contains also a <strong>IupFlatSeparator </strong>to implement 
	the bar handler.</p>

<h3><a name="Creation">Creation</a></h3>

<pre>Ihandle* IupSbox(Ihandle*<strong> child</strong>); [in C]
iup.sbox{<strong>child</strong>: ihandle} -&gt; (<strong>ih</strong>: ihandle) [in Lua]
sbox(<strong>child</strong>) [in LED]</pre>
  <p><strong>child</strong>: Identifier of an interface element which will 
  receive the box. It can be NULL (nil in Lua), or empty in LED.</p>
  <p>
  <u>Returns:</u> the identifier of the 
  created element, or NULL if an error occurs.</p>

<h3><a name="Attributes">Attributes</a></h3>


<p><strong>BARSIZE</strong> (<font SIZE="3">non inheritable</font>): controls 
the size of the bar handler. Default: 5. (since 3.27)</p>


<p><strong>COLOR</strong>: Changes the color of the
  bar handler. Default: &quot;160 160 160&quot;. (changed in 3.28 to match 
IupSplit default color)</p>


<p><strong>DIRECTION</strong> (creation only): Indicates the direction of the 
resize and the position of the bar handler. Possible values are &quot;NORTH&quot;, &quot;SOUTH&quot; 
(vertical direction), &quot;EAST&quot; or &quot;WEST&quot; (horizontal 
direction). Default: &quot;EAST&quot;.</p>
<p><a href="../attrib/iup_expand.html">EXPAND</a> (<font SIZE="3">non inheritable</font>):
  It will expand automatically only in the direction opposite to the handler.&nbsp;</p>

<p><strong>LAYOUTDRAG</strong> (<font SIZE="3">non inheritable</font>): When the 
bar is moved automatically update the children layout. Default: YES. If set to 
NO then the layout will be updated only when the mouse drag is released. (since 
3.27)</p>
<p><strong>SHOWGRIP</strong> (<font SIZE="3">non inheritable</font>): Shows the 
bar grip affordance. Default: NO. When 
set to NO, COLOR is used to fill the grip area. If set to "LINES" then instead of the traditional grip appearance, it 
will be two parallel lines. (since 3.27)</p>

  <p><b>WID</b> (read-only): returns -1 if mapped.</p>

  <blockquote>
    <hr>
</blockquote>

  <p>
<a href="../attrib/iup_font.html">FONT</a>,
    <a href="../attrib/iup_size.html">SIZE</a>,
<a href="../attrib/iup_rastersize.html">RASTERSIZE</a>,
<a href="../attrib/iup_clientsize.html">CLIENTSIZE</a>, 
	<a href="../attrib/iup_clientoffset.html">CLIENTOFFSET</a>, 
	<a href="../attrib/iup_position.html">POSITION</a>, 
<a href="../attrib/iup_minsize.html">
MINSIZE</a>, <a href="../attrib/iup_maxsize.html">
MAXSIZE</a>, <a href="../attrib/iup_theme.html">THEME</a>: 
also accepted.</p>

<h3>Notes</h3>
<p>The controls that you want to be resized must have the EXPAND=YES attribute set. 
The control inside the sbox will not be resized with a size lesser than its
<strong>Natural</strong> size. See the <a href="../layout_guide.html">Layout Guide</a> for mode details 
  on sizes.</p>
<p>The <strong>IupFlatSeparator </strong>bar handler is always the first child of the sbox. It can be obtained using <strong>IupGetChild</strong> or <strong>
IupGetNextChild</strong>.</p>
<p><strong>IupSbox</strong> can make the layout to be resized larger than the 
dialog size so some controls will be positioned outside the dialog area 
  at right or bottom. In fact this is part of the dynamic layout default reposition of controls inside the dialog. See 
  the <strong>IupRefresh</strong> function. The IUP layout does not have a maximum limit only a minimum, 
except if you use the MAXSIZE common attribute.</p>

<p>The box can be created with no elements and be dynamic filled using
  <a href="../func/iupappend.html">IupAppend</a> or
<a href="../func/iupinsert.html">IupInsert</a>.</p>


<h3><a name="Examples">Examples</a></h3>
<p><a href="../../examples/">Browse for Example Files</a></p>

<div align="center">
  <center>
  <table border="0" cellpadding="6" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
    <tr>
      <td><img border="0" src="images/iupsbox1.png"><br>
		Natural Size</td>
      <td><img border="0" src="images/iupsbox2.png"><br>
		After Expanding the Sbox</td>
    </tr>
    <tr>
      <td><img border="0" src="images/iupsbox3.png"><br>
		Expanding the Dialog</td>
      <td><img border="0" src="images/iupsbox4.png"><br>
		After Expanding the Sbox</td>
    </tr>
  </table>
  </center>
</div>

</body>

</html>
